/**
 * Created by cherry
 */

import api from '../../api/api';
import * as types from '../mutation';


const state = {
  people:{
    list:[]
  }
};

const getters = {
        peopleList: state => state.people.list
};

const actions = {
  /*
   * 获取首页列表
   * */
  getPeopleNumber ({ commit }) {
      api.getPeopleNumber(function (res) {
        commit(types.PEO_GET_NUMER_LIST, { res });
      })
  }
}

const mutations = {
  [types.PEO_GET_NUMER_LIST] (state, { res }) {
      state.people.list = res;
  }
};


export default{
    state,
    getters,
    actions,
    mutations
}
